<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>毕业设计 - 选题系统 登录</title>
    <style>
        /* 整体页面样式 */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-image: url('img/background.png'); /* 替换为你自己的背景图路径 */
            background-size: cover;
            background-position: center;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        /* 表单容器样式 */
        form {
            background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景，可根据需要调整透明度 */
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            width: 400px;
            margin-right: 700px;
        }

        /* 标题样式 */
        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
        }

        /* 输入框和选择框的公共样式 */
        div {
            margin-bottom: 20px;
        }

        /* 标签样式 */
        label {
            display: block;
            margin-bottom: 5px;
            color: #555;
        }

        /* 输入框样式 */
        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        /* 选择框样式 */
        select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        /* 按钮和忘记密码链接的容器样式 */
        .button-container {
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }

        /* 登录按钮样式 */
        button[type="submit"] {
            background-color: #007BFF;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        button[type="submit"]:hover {
            background-color: #0056b3;
        }

        /* 忘记密码链接样式 */
        a {
            color: #007BFF;
            text-decoration: none;
            margin-left: 10px;
            transition: color 0.3s ease;
        }

        a:hover {
            color: #0056b3;
        }
    </style>
</head>

<body>
<form action="loginServlet" method="post" accept-charset="UTF-8">
    <h2>毕业设计 - 选题系统</h2>
    <div>
        <label for="username">请输入用户名:</label>
        <input type="text" id="username" name="username" required>
    </div>
    <div>
        <label for="password">请输入密码:</label>
        <input type="password" id="password" name="password" required>
    </div>
    <div>
        <label for="role">选择身份:</label>
        <select id="role" name="role">
            <option value="student">学生</option>
            <option value="teacher">老师</option>
            <option value="departmentHead">系主任</option>
            <option value="admin">管理员</option>
        </select>
    </div>
    <div class="button-container">
        <button type="submit" onclick="login()">登录</button>
        <a href="forgotPassword.html">忘记密码</a>
    </div>
</form>

</body>

</html>